from django.urls import re_path
from rest_framework.routers import DefaultRouter

from . import views
# courses = views.SpitListAPIView.as_view({
#     'get': 'list',
#     'post': 'create'
# })

urlpatterns = [
    re_path(r'^spit/(?P<id>\d+)/collect/$', views.SpitCollectView.as_view()),
    re_path(r'^spit/(?P<id>\d+)/updatethumbup/$', views.AddthumbupView.as_view()),
    re_path(r'^spit/(?P<id>\d+)/children/$', views.SpitcommentView.as_view()),

]
router = DefaultRouter()
router.register('spit', views.SpitListAPIView, base_name='spit')
urlpatterns += router.urls